<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Bezdelnick
 * Date: 11.04.13
 * Time: 16:45
 * To change this template use File | Settings | File Templates.
 */
require_once("Config.php");
require_once("common/Lang.php");
require_once("dao/GenreDao.php");
require_once("persistence/Genre.php");


$genresDao = new GenreDao();

?>

<!-- Add Film dialog -->
<div id="add_film_dialog" class="jquery-dialog"
     dialogTitle="<?= Lang::ADD_FILM_DIALOG_TITLE ?>"
     dialogWidth="800"
     dialogHeight="600"
     dialogAutoOpen="false"
     dialogDraggable="true"
     dialogModal="true">

    <form id='add_film_form' method="post" action="operations-film.php">
        <table style="width: 100%;" class="white-font">
            <tr>
                <td>Название</td>
                <td colspan="2"><input name="add_film_name" style="width: 100%;"/></td>
            </tr>
            <tr>
                <td>Описание</td>
                <td colspan="2"><input name="add_film_description" style="width: 100%;"/></td>
            </tr>
            <tr>
                <td>Год выпуска</td>
                <td colspan="2">
                    <select name="add_film_year" style="width: 50%;">
                        <? for ($year = 2013; $year >= 1950; $year--) { ?>
                        <option value="<?= $year ?>"> <?= $year ?> </option>
                        <? } ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    <br/>
                    <u>Жанры</u>
                    <div class="ajax-content-container" action="oper-load-genres-by-film-id.php"></div>
                </td>
                <td>
                    <br/>
                    <u>Актеры</u>
                    <div class="ajax-content-container" action="oper-load-actors-by-film-id.php"></div>
                </td>
                <td>
                    <br/>
                    <u>Страны</u>
                    <div class="ajax-content-container" action="oper-load-countries-by-film-id.php"></div>
                </td>
            </tr>
        </table>
    </form>
</div>

<!-- Edit Film dialog -->
<div id="edit_film_dialog" class="jquery-dialog"
     dialogTitle="<?= Lang::EDIT_FILM_DIALOG_TITLE ?>"
     dialogWidth="600"
     dialogAutoOpen="false"
     dialogDraggable="true"
     dialogModal="true">

    <form id='edit_film_form' method="post" action="operations-film.php">
        <table style="width: 100%;" class="white-font">
            <tr>
                <td><input name="edit_film_id" type="hidden" style="width: 100%;"/></td>
            </tr>
            <tr>
                <td>Название</td>
                <td><input name="edit_film_name" style="width: 100%;"/></td>
            </tr>
            <tr>
                <td>Описание</td>
                <td><input name="edit_film_description" style="width: 100%;"/></td>
            </tr>
            <tr>
                <td>Жанры</td>
                <td>
                    <div class="ajax-content-container" action="oper-load-genres-by-film-id.php"></div>
                </td>
            </tr>
            <tr>
                <td>Актеры</td>
                <td>
                    <select name="edit_film_actors" multiple style="width: 100%;">
                        <? for ($year = 2013; $year >= 1950; $year--) { ?>
                        <option value="<?= $year ?>"> <?= $year ?> </option>
                        <? } ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td>Страны</td>
                <td>
                    <select name="edit_film_countries" multiple style="width: 100%;">
                        <? for ($year = 2013; $year >= 1950; $year--) { ?>
                        <option value="<?= $year ?>"> <?= $year ?> </option>
                        <? } ?>
                    </select>
                </td>
            </tr>
        </table>
    </form>
</div>

<!-- Remove Film dialog -->
<div id="remove_film_dialog" class="jquery-dialog"
     dialogTitle="<?= Lang::REMOVE_FILM_DIALOG_TITLE ?>"
     dialogWidth="600"
     dialogAutoOpen="false"
     dialogDraggable="true"
     dialogModal="true">

    <form id='remove_film_form' method="post" action="operations-film.php">
        <table style="width: 100%;" class="white-font">
            <tr>
                <td><input name="remove_film_id" type="hidden"/></td>
            </tr>
            <tr>
                <td>Название</td>
                <td><label name="remove_film_name" style="width: 100%;"/></td>
            </tr>
        </table>
    </form>
</div>